package javabasic.threads.quqian;

public class OutTask implements Runnable {
    private BankCount bankCount;

    public OutTask(BankCount bankCount) {
        this.bankCount = bankCount;
    }

    @Override
    public void run() {
        for (int i = 0; i < 3; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            bankCount.out();
            System.out.println(Thread.currentThread().getName()+"取钱100");
        }
    }
}
